<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // let a =`dhkjdkcdklckkn`;
        let b =20;
        let c = `我有${b+10}元`;
        console.log(c);
        let a = `我有${b>0?'很多':'没有'}票子.`;
        console.log(a);

        console.log(a.startsWith(1));
        console.log(a.startsWith('我'));

        let a1 = a.endsWith('e');
        let a2 = a.endsWith('票子.');

        console.log(a1);
        console.log(a2);

        console.log(a.repeat(2));


        let q = `123456789`;
        console.log(q.padStart(10,'我'));
        console.log(q.padEnd(10,'我'));
// 留后2位
        let w = q.slice(-2);
        console.log(w);
        let e = w.padStart(18,"*");
        console.log(e);



        
    </script>
</body>
</html>